package com.ww.scm.repository.mat;

import java.util.Date;

import org.springframework.stereotype.Component;

import com.ww.core.orm.hibernate.HibernateDao;
import com.ww.core.utils.DateUtils;
import com.ww.scm.constants.Constants;
import com.ww.scm.entity.mat.FinanceAccount;
import com.ww.scm.entity.mat.TransactionDetail;

//Spring Bean的标识.
@Component
public class FinanceAccountRepository extends HibernateDao<FinanceAccount, String>{

	public void delete(FinanceAccount financeAccount, String operator) {
		Date nowDate = new Date();
		financeAccount.setSysFlag(Constants.SYS_FLAG_DELETED);
		financeAccount.setLastModifier(operator);
		financeAccount.setLastModifiedTime(DateUtils.formatDateHms(nowDate));
		save(financeAccount);
	}
	
}
